package com.codeduck.dubbo.consumer.service;

import com.codeduck.dubbo.api.GreetingService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;


/**
 * @author: <a href="mailto:codeduck@163.com">Codeduck</a>
 * @createDate: 2022-08-20
 */
@Service
public class ConsumerServiceImpl implements GreetingService{

    @DubboReference
    private GreetingService greetingService;

    /**
     * 调用远程服务的方法
     *
     * @param name
     * @return java.lang.String
     */
    public String sayHello(String name) {
        return greetingService.sayHello(name);
    }

}
